<?php /* Smarty version 2.6.20, created on 2016-07-19 15:19:59
         compiled from ./suppliers/index.php */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('block', 'classes', './suppliers/index.php', 15, false),array('block', 'shops', './suppliers/index.php', 23, false),array('block', 'suppliers', './suppliers/index.php', 43, false),array('block', 'rights', './suppliers/index.php', 54, false),array('function', 'url', './suppliers/index.php', 68, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/top.php", 'smarty_include_vars' => array('subject' => 'suppliers')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "suppliers/top.php", 'smarty_include_vars' => array('subject' => 'suppliers')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div id="content">

    <div id="boxquery">
    <form method="get">
         <input type="hidden" name="m" value="inventory" />
        <input type="hidden" name="s" value="suppliers.php" />
        <input type="submit" value="查询" class="fr" />
        <li>关键字:&nbsp; <input id="keywords" name="keywords" type="text" size="30" onclick="select()" value="<?php echo $_GET['keywords']; ?>
"
        onkeyup="context_menu_suppliers(this, 'keywords=[title]')" onfocus="context_menu_suppliers(this, 'keywords=[title]')" /></li>
        <li>负责人:&nbsp;
        	<select name="classid" id="classid">
        		<option value="">全部</option>
        		<?php $this->_tag_stack[] = array('classes', array()); $_block_repeat=true;smarty_block_classes($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>
        		<option value="<?php echo $this->_tpl_vars['classes']['id']; ?>
" <?php if ($_GET['classid'] == $this->_tpl_vars['classes']['id']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['classes']['title']; ?>
</option>
        		<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_classes($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
        	</select>
        </li>
        <li>仓库:&nbsp;
        	<select name="shopid" id="shopid">
        		<option value="">全部</option>
        		<?php $this->_tag_stack[] = array('shops', array()); $_block_repeat=true;smarty_block_shops($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>
        		<option value="<?php echo $this->_tpl_vars['shops']['id']; ?>
" <?php if ($_GET['shopid'] == $this->_tpl_vars['shops']['id']): ?>selected<?php endif; ?>><?php echo $this->_tpl_vars['shops']['title']; ?>
</option>
        		<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_shops($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
        	</select>
        </li>
    </form>
    </div>

    <table width="100%" border="0" cellspacing="0" cellpadding="5" id="lister">
      <tr id="title">
        <td width="40">编号</td>
        <td>供应商名称</td>
        <td>负责人</td>
        <td>联系人</td>
        <td>联系电话</td>
        <td width="120">联系地址</td>
        <td>仓库</td>
        <td>是否通用</td>
        <td>&nbsp;</td>
      </tr>
      <?php $this->_tag_stack[] = array('suppliers', array('limit' => 20,'pager' => 'pager','page' => $this->_tpl_vars['segment']['page'],'order' => 'id desc','keywords' => $_GET['keywords'],'classid' => $_GET['classid'],'shopid' => $_GET['shopid'])); $_block_repeat=true;smarty_block_suppliers($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>
      <tr id="content">
        <td><?php echo $this->_tpl_vars['suppliers']['id']; ?>
</td>
        <td><a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=suppliers.php&uri=view&id=<?php echo $this->_tpl_vars['suppliers']['id']; ?>
"><?php echo $this->_tpl_vars['suppliers']['title']; ?>
</a></td>
        <td><?php if ($this->_tpl_vars['suppliers']['classid'] == 0): ?>未指定<?php else: ?><?php $this->_tag_stack[] = array('classes', array('id' => $this->_tpl_vars['suppliers']['classid'])); $_block_repeat=true;smarty_block_classes($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><?php echo $this->_tpl_vars['classes']['title']; ?>
<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_classes($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php endif; ?>&nbsp;</td>
        <td><?php echo $this->_tpl_vars['suppliers']['linkman']; ?>
&nbsp;</td>
        <td><?php echo $this->_tpl_vars['suppliers']['phone']; ?>
&nbsp;</td>
        <td><?php echo $this->_tpl_vars['suppliers']['address']; ?>
&nbsp;</td>
         <td><?php echo $this->_tpl_vars['suppliers']['shop_name']; ?>
&nbsp;</td>
         <td><?php if ($this->_tpl_vars['suppliers']['is_general']): ?>是<?php else: ?>否<?php endif; ?>&nbsp;</td>
        <td align="right">
        <?php if (0): ?><?php $this->_tag_stack[] = array('rights', array('right' => 'suppliers_delete')); $_block_repeat=true;smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=suppliers.php&uri=remove&id=<?php echo $this->_tpl_vars['suppliers']['id']; ?>
" onclick="return confirm('删除数据不可恢复, 确定删除?')">删除</a><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?><?php endif; ?>
        <?php $this->_tag_stack[] = array('rights', array('right' => 'suppliers_modify')); $_block_repeat=true;smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=suppliers.php&uri=modify&id=<?php echo $this->_tpl_vars['suppliers']['id']; ?>
">编辑</a><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
        <a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=suppliers.php&uri=view&id=<?php echo $this->_tpl_vars['suppliers']['id']; ?>
">查看</a>
        </td>
      </tr>
      <?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_suppliers($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
      <?php if ($this->_tpl_vars['pager']->rows == 0): ?>
      <tr id="content">
        <td colspan="20">&nbsp;</td>
      </tr>
      <?php endif; ?>
    </table>
    <div id="pager" class="mt10">
        <?php if ($this->_tpl_vars['pager']): ?> 共<?php echo $this->_tpl_vars['pager']->rows; ?>
条记录 第<?php echo $this->_tpl_vars['pager']->pagecurrent; ?>
/<?php echo $this->_tpl_vars['pager']->pages; ?>
页 <?php endif; ?> 		
        <?php if ($this->_tpl_vars['pager']->current > 1): ?><a href="<?php echo smarty_function_url(array('s1' => 1), $this);?>
">首页</a><?php endif; ?>
        <?php if ($this->_tpl_vars['pager']->current > 1): ?><a href="<?php echo smarty_function_url(array('s1' => $this->_tpl_vars['pager']->current-1), $this);?>
">上页</a><?php endif; ?>
        <?php if ($this->_tpl_vars['pager']->current < $this->_tpl_vars['pager']->pages): ?><a href="<?php echo smarty_function_url(array('s1' => $this->_tpl_vars['pager']->current+1), $this);?>
">下页</a><?php endif; ?>
        <?php if ($this->_tpl_vars['pager']->current < $this->_tpl_vars['pager']->pages): ?><a href="<?php echo smarty_function_url(array('s1' => $this->_tpl_vars['pager']->pages), $this);?>
">尾页</a><?php endif; ?>
    </div>
    <p>&nbsp;</p>
    <?php $this->_tag_stack[] = array('rights', array('right' => 'suppliers_create')); $_block_repeat=true;smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?><ul id="addmenu"><li><a href="<?php echo $this->_tpl_vars['site_admin']; ?>
m=inventory&s=suppliers.php&uri=create">添加一个新的供应商</a></li></ul><?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo smarty_block_rights($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "admin/bottom.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
</body>
</html>